#ifndef __MAPTILE_H__
#define __MAPTILE_H__

#include "Entity.h"
#include <boost/smart_ptr/shared_ptr.hpp>


class CMapTile : public IEntity
{
public:
	enum eType
	{
		nothing=0,
		floor,
		wall,
		maxType
	};

	CMapTile();
	virtual ~CMapTile();
	virtual void render();
	virtual void update();
	virtual void load(const char *szFileName) {}

	inline void setType(eType val)
	{
		if (val < CMapTile::maxType)
			m_eType = val;
		else
			m_eType = CMapTile::nothing;
	}

	inline eType getType()
	{
		return m_eType;
	}

private:
	eType	m_eType;
};


typedef boost::shared_ptr<CMapTile> MapTilePtr;

struct MapTilePtrRender
{
	void operator()( const MapTilePtr & a )
	{
		a->render();
	}
};

#endif // __MAPTILE_H__